import { SET_USER_INFO } from '../constant';

const initState = {
    login:false
}

export default function userInfo_reducer(preState = initState , action) {
    const {type,data} = action;
    switch (type) {
        case SET_USER_INFO:
           return {
                ...preState,
                login:true,
                userInfo:data
            }
        default:
            return preState; 
    }
};

